﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Controls
{
    public partial class ContentPanel : Panel
    {
        private Control _content;
        public Control Content
        {
            get { return _content; }
            set
            {
                _content = value;
                SetContent();
            }
        }

        public ContentPanel()
        {
            InitializeComponent();
        }

        private void SetContent()
        {
            Controls.Clear();
            if(_content != null)
            {
                Controls.Add(_content);
            }
        }
    }
}
